import request from '@/utils/request';

//查询
export function permissionTree(data) {
  return request({
    url: '/admin/auth/permission/permissionTree',
    method: 'get',
    params: data,
  });
}

//新增
export function permissionSave(data) {
  return request({
    url: '/admin/auth/permission/permissionSave',
    method: 'post',
    data,
  });
}

//修改
export function permissionUpdate(data) {
  return request({
    url: '/admin/auth/permission/permissionUpdate',
    method: 'post',
    data,
  });
}

//删除
export function permissionRemove(data) {
  return request({
    url: '/admin/auth/permission/permissionRemove',
    method: 'DELETE',
    params: data,
  });
}

//根据角色id查询权限
export function permissionByRoleId(data) {
  return request({
    url: '/admin/auth/permission/permissionByRoleId',
    method: 'get',
    params: data,
  });
}
